<fieldset>
    <legend>Category</legend>

    <div style="text-align: right">
        <a href="<?php echo site_url(); ?>/category/add">Thêm category</a>
    </div>
    <hr/>
    <table>
        <tr>
            <th>CategoryID</th>
            <th>ParentID</th>
            <th>Name</th>
            <th>Description</th>
            <th>Status</th>
            <th>CreateDate</th>
            <th>Action</th>
        </tr>
        <?php
            if($categoryList){
                foreach($categoryList as $category)
                {
        ?>
        <tr>
            <td><?php echo $category['CategoryID']; ?></td>
            <td><?php echo $category['ParentID']; ?></td>
            <td><?php echo $category['Name']; ?></td>
            <td class="description"><?php echo $category['Description']; ?></td>
            <td><?php echo $category['Status']; ?></td>
            <td><?php echo strftime("%d/%m/%Y  %H:%M:%S", $category['CreateDate']); ?></td>
            <td>
                <a href="<?php echo site_url(); ?>/category/update/id/<?php echo $category['CategoryID']; ?>">Edit</a>
                <a href="<?php echo site_url(); ?>/category/remove/id/<?php echo $category['CategoryID']; ?>" onclick="return confirm('Are you sure?');">Delete</a>
            </td>
        </tr>
        <?php
                }
            }
        ?>
    </table>
</fieldset>